Hello all,
I have a pre save trigger on all attributes to let me manage some actions on requirement objects. One action looks at a few attributes to determine the version number and an indication of whether the requirement is accepted (reviewed) or in work.
All works fine unless a user makes a requirement change (flagging in work) then undoes / rolls back the change to a previously accepted version. My script cannot determine if the change was actually made by the user or was due to the undo and gives an incorrect version.
My question is: during a triggered event, is there anyway to determine if the change was manually entered by the user or if it is due to an undo?
I can think of work arounds, but it basically comes down to having some history attribute to let me track the last change. I really don't want to create attributes to let me manage DXL, any suggestions would be welcome.
Thanks,
Steven
SAdamson - Mon Dec 14 17:54:19 EST 2015 |
Re: Detect an Undo/Rollback during pre save trigger Costas..Aravidis - Tue Dec 15 08:11:32 EST 2015
Hi Steve,
You can have a look at the history and especially at the session. If that is at the same session then see if there is a change and build your conditions from there. It is much easier if you create your trigger on sync of the object so specifically when an attribute changes then the trigger runs.
Kind regards,
Costas
|